<%@ include file="../common/IncludeTop.jsp"%>
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- 2. jQuery导入，建议使用1.9以上的版本 -->
<script src="js/jquery-2.1.0.min.js"></script>
<!-- 3. 导入bootstrap的js文件 -->
<script src="js/bootstrap.min.js"></script>
<script>
	$(window).ready(function(){
		if (${not empty regist_msg}){
			alert("${regist_msg}");
		}
	})
</script>
<script type="text/javascript">
	function refreshCode(){
		var vcode = document.getElementById("vcode");
		vcode.src = "${pageContext.request.contextPath}/checkcodeservlet?time="+new Date().getTime();
	}
</script>
<div id="Catalog">

	<form action="doregist" method="post" >

		<h3>User Information</h3>

		<table>
			<tr>
				<td>User ID:</td>
				<td>
					<input type="text" name="username" id="username" onblur="usernameIsExist();" value="${condition.username[0]}"/>

				</td>
				<td>
					<div id="usernameMsg"></div>
					<script type="text/javascript" src="${pageContext.request.contextPath }/js/register.js"></script>
				</td>
			</tr>
			<tr>
				<td>New password:</td>
				<td><input type="password" name="password" value="${condition.repeatedPassword[0]}"/></td>
			</tr>
			<tr>
				<td>Repeat password:</td>
				<td><input type="password" name="repeatedPassword" value="${condition.repeatedPassword[0]}"/></td>
			</tr>
		</table>

		<h3>Account Information</h3>

		<table>
			<tr>
				<td>First name:</td>
				<td><input type="text" name="firstName"  value="${condition.firstName[0]}"/></td>
			</tr>
			<tr>
				<td>Last name:</td>
				<td><input type="text" name="lastName"  value="${condition.lastName[0]}"/></td>
			</tr>
			<tr>
				<td>Email:</td>
				<td><input type="text" name="email"  value="${condition.email[0]}"/></td>
			</tr>
			<tr>
				<td>Phone:</td>
				<td><input type="text" name="phone"  value="${condition.phone[0]}"/></td>
			</tr>
			<tr>
				<td>Address 1:</td>
				<td><input type="text" name="address1"  value="${condition.address1[0]}"/></td>
			</tr>
			<tr>
				<td>Address 2:</td>
				<td><input type="text" name="address2" size="40"  value="${condition.address2[0]}"/></td>
			</tr>
			<tr>
				<td>City:</td>
				<td><input type="text" name="city"  value="${condition.city[0]}"/></td>
			</tr>
			<tr>
				<td>State:</td>
				<td><input type="text" name="state" size="4"  value="${condition.state[0]}"/></td>
			</tr>
			<tr>
				<td>Zip:</td>
				<td><input type="text" name="zip" size="10"  value="${condition.zip[0]}"/></td>
			</tr>
			<tr>
				<td>Country:</td>
				<td><input type="text" name="country" size="15"  value="${condition.country[0]}"/></td>
			</tr>
		</table>

		<h3>Profile Information</h3>

		<table>
			<tr>
				<td>Language Preference:</td>
				<td><select name="languagePreference">
					<!-- 循环 -->
					<option selected="selected" value="english">english</option>
					<option value="japanese">japanese</option>

				</select></td>
			</tr>
			<tr>
				<td>Favourite Category:</td>
				<td><select name="favouriteCategoryId">
					<option selected="selected" value="FISH">FISH</option>
					<option value="DOGS">DOGS</option>
					<option value="REPTILES">REPTILES</option>
					<option value="CATS">CATS</option>
					<option value="BIRDS">BIRDS</option>
				</select></td>
			</tr>
			<tr>
				<td>Enable MyList</td>
				<td><input type="checkbox" name="listOption" value="1" /></td>
			</tr>
			<tr>
				<td>Enable MyBanner</td>
				<td><input type="checkbox" name="bannerOption" value="1" /></td>
			</tr>

		</table>
		<h3>Check</h3>
		<table>
			<tr>
				<td>CheckCode:</td>
				<td><input type="text" name="verifycode"  id="verifycode" /></td>
			</tr>
			<tr>
				<td>
				</td>
				<td>
					<a href="javascript:refreshCode()">
						<img src="${pageContext.request.contextPath}/checkcodeservlet" title="看不清点击刷新" id="vcode"/>
					</a>
				</td>
			</tr>
		</table>

		<input type="submit" name="newAccount" value="Save Account Information"/>

	</form>
</div>

<%@ include file="../common/IncludeBottom.jsp"%>